
//获取舞台上的video对象
video = document.getElementById('video');

const constrains = {
	video: true,
	audio: false
}

navigator.mediaDevices.getUserMedia(constrains).then(stream =>{
	console.log('得到stream的类型是MediaStream');
})


navigator.mediaDevices.getUserMedia(constrains).then(stream =>{
	video.srcObject = stream;
	video.play();
})


